#include "Slider.h"
#include "commctrl.h"

Slider::Slider()
{
}
Slider::~Slider()
{
	DestroyWindow(m_hWnd);
}

bool Slider::Setup(HWND a_hWnd, HINSTANCE a_hInst, int a_xPos, int a_yPos, int a_width, int a_height, char* a_label)
{
	m_hWnd = CreateWindowEx(NULL, TRACKBAR_CLASS, a_label, WS_CHILD | WS_VISIBLE | TBS_AUTOTICKS | TBS_ENABLESELRANGE, a_xPos, a_yPos, a_width, a_height, a_hWnd, NULL, a_hInst, (LPVOID)this);
	if(m_hWnd == NULL)
	{
		return false;
	}

	UpdateWindow(m_hWnd);
	ShowWindow(m_hWnd, SW_SHOW);

	return true;
}